package com.open.capacity.points.feign;

import com.open.capacity.common.auth.details.LoginAppUser;
import com.open.capacity.common.constant.ServiceNameConstant;
import com.open.capacity.common.feign.FeignExceptionConfig;
import com.open.capacity.points.feign.fallback.UserFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

@FeignClient(value= ServiceNameConstant.USER,configuration = FeignExceptionConfig.class ,fallbackFactory = UserFeignClientFallback.class, decode404 = true)
public interface UserFeignClient {
    @GetMapping(value = "/users/current")
    LoginAppUser getLoginAppUser();
}
